﻿#查找路径下面所有源文件
aux_source_directory(. SRC_LIST)

#引用头文件目录

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/3rdlib/include)



#引用库目录

LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/3rdlib/lib)



#生成exe文件
ADD_EXECUTABLE(testexe ${SRC_LIST})

#设置预编译
SET_TARGET_PROPERTIES(testexe PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
cotire(testexe)

#设置预处理
#add_definitions(-DMYDLL_EXPORTS)
#set_target_properties(target1 target2 PROPERTIES COMPILE_DEFINITIONS "COMPILE_UNIT_TESTS")

#设置目录
set_target_properties(testexe PROPERTIES FOLDER "TestCmake")

#复制头文件到inchhvi
#install(FILES test.h DESTINATION ${PROJECT_SOURCE_DIR}/3rdlib/include)


